package com.h117121.fashionshop.core.dom;

import com.h117121.fashionshop.constant.AppConstant;

public class SettingForm {
	int numItemPerPage = AppConstant.NUM_ITEM_PER_PAGE;
	int numMaxItemLeftPanel = AppConstant.NUM_MAX_ITEM_LIST_LEFTPANEL;
	int numSimilarItem = AppConstant.NUM_SIMILAR_ITEM;
	int numMostSoldItem = AppConstant.NUM_MOST_SOLD_ITEM;
	int numNewestItem = AppConstant.NUM_NEWEST_ITEM;
	int numMostSoldItemAdmin = AppConstant.ADMIN_NUM_MOST_SOLD_ITEM;
	public int getNumMostSoldItemAdmin() {
		return numMostSoldItemAdmin;
	}

	public void setNumMostSoldItemAdmin(int numMostSoldItemAdmin) {
		this.numMostSoldItemAdmin = numMostSoldItemAdmin;
	}

	public int getNumNewestItemAdmin() {
		return numNewestItemAdmin;
	}

	public void setNumNewestItemAdmin(int numNewestItemAdmin) {
		this.numNewestItemAdmin = numNewestItemAdmin;
	}

	int numNewestItemAdmin = AppConstant.ADMIN_NUM_NEWEST_ITEM;
	int numItemPerPageAdmin = AppConstant.ADMIN_NUM_ITEM_PER_PAGE;

	public void saveSetting() {
		AppConstant.NUM_ITEM_PER_PAGE = numItemPerPage;
		AppConstant.NUM_MAX_ITEM_LIST_LEFTPANEL = numMaxItemLeftPanel;
		AppConstant.NUM_SIMILAR_ITEM = numSimilarItem;
		AppConstant.NUM_MOST_SOLD_ITEM = numMostSoldItem;
		AppConstant.NUM_NEWEST_ITEM = numNewestItem;
		AppConstant.ADMIN_NUM_ITEM_PER_PAGE = numItemPerPageAdmin;
		AppConstant.ADMIN_NUM_MOST_SOLD_ITEM = numMostSoldItemAdmin;
		AppConstant.ADMIN_NUM_NEWEST_ITEM = numNewestItemAdmin;
	}

	public int getNumItemPerPage() {
		return numItemPerPage;
	}

	public void setNumItemPerPage(int numItemPerPage) {
		this.numItemPerPage = numItemPerPage;
	}

	public int getNumMaxItemLeftPanel() {
		return numMaxItemLeftPanel;
	}

	public void setNumMaxItemLeftPanel(int numMaxItemLeftPanel) {
		this.numMaxItemLeftPanel = numMaxItemLeftPanel;
	}

	public int getNumSimilarItem() {
		return numSimilarItem;
	}

	public void setNumSimilarItem(int numSimilarItem) {
		this.numSimilarItem = numSimilarItem;
	}

	public int getNumMostSoldItem() {
		return numMostSoldItem;
	}

	public void setNumMostSoldItem(int numMostSoldItem) {
		this.numMostSoldItem = numMostSoldItem;
	}

	public int getNumNewestItem() {
		return numNewestItem;
	}

	public void setNumNewestItem(int numNewestItem) {
		this.numNewestItem = numNewestItem;
	}

	public int getNumItemPerPageAdmin() {
		return numItemPerPageAdmin;
	}

	public void setNumItemPerPageAdmin(int numItemPerPageAdmin) {
		this.numItemPerPageAdmin = numItemPerPageAdmin;
	}
}
